#ifndef _SRC_NET_TIMER_ID_H_
#define _SRC_NET_TIMER_ID_H_

#include "src/base/utils.h"

namespace fio66::net {
class Timer;

///
/// An opaque identifier, for canceling Timer.
///
class TimerId {
 public:
  TimerId() : timer_(NULL), sequence_(0) {}

  TimerId(Timer* timer, int64_t seq) : timer_(timer), sequence_(seq) {}
  ~TimerId() {}
  // default copy-ctor, dtor and assignment are okay

  friend class TimerQueue;

 private:
  Timer* timer_;
  int64_t sequence_;
};

}  // namespace fio66::net

#endif  // _SRC_NET_TIMER_ID_H_
